<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<input type="file" id="file">
<script>
  document.getElementById('file').addEventListener('change', (e) => {
    console.log(e.target.files[0])
  })
</script>
</body>
</html>
